/*
 * jPanelRight.java
 *
 * Created on 1 de mayo de 2006, 15:29
 */

package fmap.gui;

import fmap.DatosCompartidos;
import fmap.gui.actionListener.ListenerJFrameMain;
import fmap.model.MapF;
import fmap.model.Node;
import javax.swing.DefaultComboBoxModel;
import javax.swing.ImageIcon;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.JTextPane;

/**
 *
 * @author  javi
 */
public class JPanelRight extends javax.swing.JPanel
{
    String icon;
    
    /** Creates new form jPanelRight */
    public JPanelRight ()
    {
        initComponents ();
        buttonSaveNode.addActionListener ( new ListenerJFrameMain () );
        buttonSaveMapF.addActionListener ( new ListenerJFrameMain () );
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents()
    {
        jPanel3 = new javax.swing.JPanel();
        jSeparator5 = new javax.swing.JSeparator();
        jSeparator6 = new javax.swing.JSeparator();
        jLabel12 = new javax.swing.JLabel();
        textFMapFTitulo = new javax.swing.JTextField();
        jScrollPane3 = new javax.swing.JScrollPane();
        textPMapFDesc = new javax.swing.JTextPane();
        jLabel13 = new javax.swing.JLabel();
        comboBoxCatMapF = new javax.swing.JComboBox();
        jLabel14 = new javax.swing.JLabel();
        textFMapFRutaOrigen = new javax.swing.JTextField();
        jLabel15 = new javax.swing.JLabel();
        jButton3 = new javax.swing.JButton();
        labelIcon2 = new javax.swing.JLabel();
        buttonSaveMapF = new javax.swing.JButton();
        jLabel16 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        textFMapFNum = new javax.swing.JTextField();
        jPanel1 = new javax.swing.JPanel();
        buttonSaveNode = new javax.swing.JButton();
        jScrollPane2 = new javax.swing.JScrollPane();
        textPComent = new javax.swing.JTextPane();
        jLabel5 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        textFDate = new javax.swing.JTextField();
        textFSize = new javax.swing.JTextField();
        textFName = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        textPKey = new javax.swing.JTextPane();
        jSeparator1 = new javax.swing.JSeparator();
        jSeparator2 = new javax.swing.JSeparator();
        jButton1 = new javax.swing.JButton();
        labelIcon = new javax.swing.JLabel();
        jLabel18 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        textFCollectionTitulo = new javax.swing.JTextField();
        jScrollPane4 = new javax.swing.JScrollPane();
        textPCollectionDesc = new javax.swing.JTextPane();
        jLabel20 = new javax.swing.JLabel();
        jLabel21 = new javax.swing.JLabel();
        jSeparator7 = new javax.swing.JSeparator();
        jLabel22 = new javax.swing.JLabel();
        jLabel23 = new javax.swing.JLabel();
        jPanel4 = new javax.swing.JPanel();

        setLayout(new java.awt.CardLayout());

        setMaximumSize(new java.awt.Dimension(200, 200));

        jLabel12.setFont(new java.awt.Font("Dialog", 0, 12));
        jLabel12.setText("Titulo:");

        jScrollPane3.setViewportView(textPMapFDesc);

        jLabel13.setFont(new java.awt.Font("Dialog", 0, 12));
        jLabel13.setText("Descripcion:");

        comboBoxCatMapF.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        jLabel14.setFont(new java.awt.Font("Dialog", 0, 12));
        jLabel14.setText("Categoria:");

        textFMapFRutaOrigen.setBackground(new java.awt.Color(255, 255, 204));
        textFMapFRutaOrigen.setEditable(false);

        jLabel15.setFont(new java.awt.Font("Dialog", 0, 12));
        jLabel15.setText("Ruta Origen:");

        jButton3.setText("Cambiar icono");
        jButton3.setMargin(new java.awt.Insets(2, 8, 2, 8));
        jButton3.addMouseListener(new java.awt.event.MouseAdapter()
        {
            public void mouseClicked(java.awt.event.MouseEvent evt)
            {
                jButton3MouseClicked(evt);
            }
        });

        labelIcon2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/fmap/img/folder.png")));

        buttonSaveMapF.setIcon(new javax.swing.ImageIcon(getClass().getResource("/fmap/img/save.png")));
        buttonSaveMapF.setText(" Guardar");
        buttonSaveMapF.setActionCommand("saveMapF");
        buttonSaveMapF.setMargin(new java.awt.Insets(0, 4, 0, 4));
        buttonSaveMapF.setMaximumSize(new java.awt.Dimension(87, 20));
        buttonSaveMapF.setMinimumSize(new java.awt.Dimension(87, 20));
        buttonSaveMapF.setPreferredSize(new java.awt.Dimension(87, 20));

        jLabel16.setIcon(new javax.swing.ImageIcon(getClass().getResource("/fmap/img/logo_2.png")));

        jLabel17.setFont(new java.awt.Font("Dialog", 1, 10));
        jLabel17.setText("Volumen de ficheros");

        jLabel6.setFont(new java.awt.Font("Dialog", 0, 12));
        jLabel6.setText("N\u00ba:");

        textFMapFNum.setBackground(new java.awt.Color(255, 255, 204));
        textFMapFNum.setFont(new java.awt.Font("Dialog", 1, 12));
        textFMapFNum.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        textFMapFNum.setEnabled(false);

        org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jScrollPane3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 143, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, buttonSaveMapF, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, jSeparator5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 143, Short.MAX_VALUE)
                    .add(jPanel3Layout.createSequentialGroup()
                        .add(jLabel17)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 11, Short.MAX_VALUE)
                        .add(jLabel16))
                    .add(jLabel13)
                    .add(jLabel14)
                    .add(comboBoxCatMapF, 0, 143, Short.MAX_VALUE)
                    .add(jLabel15)
                    .add(textFMapFRutaOrigen, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 143, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel3Layout.createSequentialGroup()
                        .add(jLabel6)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(textFMapFNum, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 39, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(jLabel12)
                    .add(textFMapFTitulo, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 143, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel3Layout.createSequentialGroup()
                        .add(labelIcon2)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jButton3)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED))
                    .add(jSeparator6, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 143, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(jLabel17)
                    .add(jLabel16))
                .add(11, 11, 11)
                .add(jSeparator5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(0, 0, 0)
                .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(textFMapFNum, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel6))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jLabel15)
                .add(2, 2, 2)
                .add(textFMapFRutaOrigen, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jSeparator6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jButton3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(labelIcon2))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jLabel12)
                .add(2, 2, 2)
                .add(textFMapFTitulo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jLabel14)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(comboBoxCatMapF, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jLabel13)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jScrollPane3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 159, Short.MAX_VALUE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(buttonSaveMapF, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 26, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        add(jPanel3, "cardMapF");

        buttonSaveNode.setIcon(new javax.swing.ImageIcon(getClass().getResource("/fmap/img/save.png")));
        buttonSaveNode.setText(" Guardar");
        buttonSaveNode.setActionCommand("saveNode");
        buttonSaveNode.setMargin(new java.awt.Insets(0, 4, 0, 4));
        buttonSaveNode.setMaximumSize(new java.awt.Dimension(87, 20));
        buttonSaveNode.setMinimumSize(new java.awt.Dimension(87, 20));
        buttonSaveNode.setPreferredSize(new java.awt.Dimension(87, 20));

        jScrollPane2.setViewportView(textPComent);

        jLabel5.setFont(new java.awt.Font("Arial", 0, 12));
        jLabel5.setText("Comentario:");

        jLabel4.setFont(new java.awt.Font("Arial", 0, 12));
        jLabel4.setText("Palabras clave:");

        jLabel2.setFont(new java.awt.Font("Arial", 0, 12));
        jLabel2.setText("Fecha:");

        textFDate.setBackground(new java.awt.Color(255, 255, 204));
        textFDate.setEditable(false);

        textFSize.setBackground(new java.awt.Color(255, 255, 204));
        textFSize.setEditable(false);
        textFSize.setDisabledTextColor(new java.awt.Color(204, 204, 255));

        textFName.setBackground(new java.awt.Color(255, 255, 204));
        textFName.setEditable(false);

        jLabel1.setFont(new java.awt.Font("Arial", 0, 12));
        jLabel1.setText("Nombre:");

        jLabel3.setFont(new java.awt.Font("Arial", 0, 12));
        jLabel3.setText("Tama\u00f1o:");

        textPKey.setToolTipText("Introduce las palabras clave separadas por coma");
        jScrollPane1.setViewportView(textPKey);

        jButton1.setText("Cambiar icono");
        jButton1.setMargin(new java.awt.Insets(2, 8, 2, 8));
        jButton1.addMouseListener(new java.awt.event.MouseAdapter()
        {
            public void mouseClicked(java.awt.event.MouseEvent evt)
            {
                jButton1MouseClicked(evt);
            }
        });

        labelIcon.setIcon(new javax.swing.ImageIcon(getClass().getResource("/fmap/img/folder.png")));

        jLabel18.setIcon(new javax.swing.ImageIcon(getClass().getResource("/fmap/img/logo_2.png")));

        jLabel19.setFont(new java.awt.Font("Dialog", 1, 10));
        jLabel19.setText("Nodo");

        org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jScrollPane2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 143, Short.MAX_VALUE)
                    .add(buttonSaveNode, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jSeparator1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 143, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jLabel3)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jLabel2)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, textFDate, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 143, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, textFSize, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 143, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, textFName, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 143, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jLabel1)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jSeparator2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 143, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jLabel5)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jLabel4)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel1Layout.createSequentialGroup()
                        .add(labelIcon)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jButton1))
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 143, Short.MAX_VALUE)
                    .add(jPanel1Layout.createSequentialGroup()
                        .add(jLabel19)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 91, Short.MAX_VALUE)
                        .add(jLabel18)))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(jLabel18)
                    .add(jLabel19))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jSeparator1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(0, 0, 0)
                .add(jLabel1)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(textFName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(5, 5, 5)
                .add(jLabel3)
                .add(0, 0, 0)
                .add(textFSize, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jLabel2)
                .add(0, 0, 0)
                .add(textFDate, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jSeparator2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jButton1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(labelIcon))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jLabel4)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 33, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jLabel5)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jScrollPane2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 139, Short.MAX_VALUE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(buttonSaveNode, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 26, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        add(jPanel1, "cardNode");

        textFCollectionTitulo.setBackground(new java.awt.Color(255, 255, 204));
        textFCollectionTitulo.setEditable(false);

        textPCollectionDesc.setBackground(new java.awt.Color(255, 255, 204));
        textPCollectionDesc.setEditable(false);
        jScrollPane4.setViewportView(textPCollectionDesc);

        jLabel20.setFont(new java.awt.Font("Dialog", 0, 12));
        jLabel20.setText("Titulo:");

        jLabel21.setFont(new java.awt.Font("Dialog", 0, 12));
        jLabel21.setText("Descripcion:");

        jLabel22.setIcon(new javax.swing.ImageIcon(getClass().getResource("/fmap/img/logo_2.png")));

        jLabel23.setFont(new java.awt.Font("Dialog", 1, 10));
        jLabel23.setText("Colecci\u00f3n");

        org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jScrollPane4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 143, Short.MAX_VALUE)
                    .add(jPanel2Layout.createSequentialGroup()
                        .add(jLabel23)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 70, Short.MAX_VALUE)
                        .add(jLabel22))
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jSeparator7, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 143, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jLabel21)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, textFCollectionTitulo, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 143, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jLabel20))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(jLabel22)
                    .add(jLabel23))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jSeparator7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(16, 16, 16)
                .add(jLabel20)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(textFCollectionTitulo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(22, 22, 22)
                .add(jLabel21)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jScrollPane4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 320, Short.MAX_VALUE)
                .addContainerGap())
        );
        add(jPanel2, "cardCollection");

        org.jdesktop.layout.GroupLayout jPanel4Layout = new org.jdesktop.layout.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 167, Short.MAX_VALUE)
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 484, Short.MAX_VALUE)
        );
        add(jPanel4, "cardBlank");

    }// </editor-fold>//GEN-END:initComponents
    
    private void jButton3MouseClicked (java.awt.event.MouseEvent evt)//GEN-FIRST:event_jButton3MouseClicked
    {//GEN-HEADEREND:event_jButton3MouseClicked
// TODO add your handling code here:
        new JFrameIcons ("mapFPanelRight");
    }//GEN-LAST:event_jButton3MouseClicked
    
    private void jButton1MouseClicked (java.awt.event.MouseEvent evt)//GEN-FIRST:event_jButton1MouseClicked
    {//GEN-HEADEREND:event_jButton1MouseClicked
// TODO add your handling code here:
        new JFrameIcons ("node"+DatosCompartidos.getNodeActual ().getType ());
        
    }//GEN-LAST:event_jButton1MouseClicked
    
    
    public JTextField getTextMapFFNum ()
    { return textFMapFNum;}
    public JTextField getTextFName ()
    { return textFName;}
    public JTextField getTextFDate ()
    { return textFDate;}
    public JTextField getTextFSize ()
    { return textFSize;}
    public JTextPane getTextPKey ()
    { return textPKey;}
    public JTextPane getTextPComent ()
    { return textPComent;}
    public JLabel getLabelIcon ()
    { return labelIcon;}
    public String getIcon ()
    { return icon;}
    public JTextField getTextFMapFTitulo ()
    { return textFMapFTitulo;}
    public JTextField getTextFMapFRutaOrigen ()
    { return textFMapFRutaOrigen;}
    public JTextPane getTextFMapFDesc ()
    { return textPMapFDesc;}
    public JTextField getTextFCollectionTitulo ()
    { return textFCollectionTitulo;}
    public JTextPane getTextPCollectionDesc ()
    { return textPCollectionDesc;}
    public JComboBox getComboBoxCatMapF ()
    { return comboBoxCatMapF;}
    
    public void setIcon ( String _icon )
    {
        icon = _icon;
        labelIcon.setIcon ( new ImageIcon ( getClass ().getResource (icon) ) );
    }
    
    public void setIcon2 ( String _icon )
    {
        icon = _icon;
        labelIcon2.setIcon ( new ImageIcon ( getClass ().getResource (icon) ) );
    }
    
    
    
    public void setCats ( int _idCat )
    {
        if( DatosCompartidos.getACat ().length > 0 )
        {
            comboBoxCatMapF.setModel ( new DefaultComboBoxModel ( DatosCompartidos.getACat () ) );
        }
        
        if( _idCat > 0 )
        {
            for( int i=0; i<DatosCompartidos.getACat ().length; i++ )
            {
                if( DatosCompartidos.getACat ()[i].getId () == _idCat )    comboBoxCatMapF.setSelectedItem ( DatosCompartidos.getACat ()[i] );
            }
        }
    }
    
    
    
    
    
    /**
     * Muestra y actualiza el panel del mapa de ficheros con la información 
     * que le pasamos como parametro
     */
    public void updatePanelRight ( MapF mapF )
    {
        textFMapFNum.setText ( new Integer (mapF.getId ()).toString () );
        textFMapFTitulo.setText ( mapF.getName () );
        textFMapFRutaOrigen.setText ( mapF.getPath () );
        textPMapFDesc.setText ( mapF.getDesc () );
        // Vamos a enviar el icono y las categorias al panel derecho
        setIcon2 ( mapF.getIcon () );
        setCats ( mapF.getIdCat () );
    }
    

    /**
     * Muestra y actualiza el panel del nodo con la información 
     * que le pasamos como parametro
     */
    public void updatePanelRight ( Node node )
    {
        
        textFName.setText ( node.getName () );
        textFDate.setText ( node.getDateString ());
        textFSize.setText ( node.getSizeString () );
        textPKey.setText ( node.getKeyWord () );
        textPComent.setText ( node.getDescrip () );
        setIcon ( node.getIcon () );
    }
    
    
    
    
    
    
    
    
    
    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton buttonSaveMapF;
    private javax.swing.JButton buttonSaveNode;
    private javax.swing.JComboBox comboBoxCatMapF;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton3;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JSeparator jSeparator5;
    private javax.swing.JSeparator jSeparator6;
    private javax.swing.JSeparator jSeparator7;
    private javax.swing.JLabel labelIcon;
    private javax.swing.JLabel labelIcon2;
    private javax.swing.JTextField textFCollectionTitulo;
    private javax.swing.JTextField textFDate;
    private javax.swing.JTextField textFMapFNum;
    private javax.swing.JTextField textFMapFRutaOrigen;
    private javax.swing.JTextField textFMapFTitulo;
    private javax.swing.JTextField textFName;
    private javax.swing.JTextField textFSize;
    private javax.swing.JTextPane textPCollectionDesc;
    private javax.swing.JTextPane textPComent;
    private javax.swing.JTextPane textPKey;
    private javax.swing.JTextPane textPMapFDesc;
    // End of variables declaration//GEN-END:variables
    
}
